package cn.tedu.ioc;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

@Controller
@RestController
@Component("a")
/**自己制定bean的名字*/
//{"user",new User()}
//@Service
//@Controller
/**以上三个均为spring提供的注解,用来IOC*/
public class User {
    public void get(){
        System.out.println("这是一个user的get方法");
    }
}
